package com.zmzncs.lmtc.module.customer.dao;

import com.zmzncs.lmtc.module.customer.pojo.card.Card;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzncs.lmtc.module.customer.pojo.card.CardDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 客户-会员卡 Mapper 接口
 * </p>
 *
 * @author 任建波
 * @since 2020-09-02
 */
@Repository
public interface CardDao extends BaseMapper<Card> {

    /**根据车牌查询白天夜间卡*/
    CardDTO getDayNightMonthByCarNumber(@Param("customerId") Long customerId, @Param("carNumber") String carNumber);

    /**根据customerId和carId查询*/
    List<CardDTO> getByCustomerIdCarId(@Param("customerId") Long customerId, @Param("carId") Long carId);
    /**根据carId和parkId查询客户车辆服务*/
    CardDTO getCustomerCardByCarIdAndParkId(@Param("customerId") Long customerId, @Param("carId") Long carId, @Param("parkId") Long parkId);
    /**获取客户月租服务*/
    List<CardDTO> getCustomerMonthCardList(@Param("customerId") Long customerId);
    /**获取客户时长服务*/
    List<CardDTO> getCustomerDurationCardList(@Param("customerId") Long customerId);
    /**获取车牌未到期的月卡*/
    List<CardDTO> getCarUnexpiredCardList(Long carId);
    /**根据carId和parkId查询客户车辆停车场月租服务*/
    CardDTO getMonthCardByCarIdParkId(@Param("carId") Long carId, @Param("parkId") Long parkId);
    /**根据customerId和parkId查询客户车辆停车场时长服务*/
    List<CardDTO> getDurationCardByCustomerIdParkId(@Param("customerId") Long customerId, @Param("parkId") Long parkId);
    /**查询余额*/
    CardDTO getBalance(@Param("customerId") Long customerId);
    /**查询用户卡信息*/
    CardDTO getCardAndCarByCardId(Long cardId);

    /**查询用户禁用的月租卡信息*/
    CardDTO getfreezeCard(@Param("customerId") Long customerId, @Param("carNumber") String carNumber);
}
